package sushidiscount

class HomeController {

    def index = {
        redirect(action: "home", params: params)
    }

    def home = {
        [MondayList: Discount.findAllByMonday(true), MondayTotal: Discount.countByMonday(true),
        TuesdayList: Discount.findAllByTuesday(true), TuesdayTotal: Discount.countByTuesday(true),
        WednesdayList: Discount.findAllByWednesday(true), WednesdayTotal: Discount.countByWednesday(true),
        ThursdayList: Discount.findAllByThursday(true), ThursdayTotal: Discount.countByThursday(true),
        FridayList: Discount.findAllByFriday(true), FridayTotal: Discount.countByFriday(true),
        SaturdayList: Discount.findAllBySaturday(true), SaturdayTotal: Discount.countBySaturday(true),
        SundayList: Discount.findAllBySunday(true), SundayTotal: Discount.countBySunday(true)]
    }


}
